<template>
  <el-container>
    <el-header style="height: 47px;">
      <p>电子支付详情</p>
    </el-header>
    <el-main>
      <el-row class="btn-group">
      <el-button  class="btn"  @click="handleDownloadfinacia"><span>导出</span> <i class="el-icon-download"></i>
      </el-button>
      </el-row>
      <el-table style="height: 100%"
                v-loading="loading"
                element-loading-text="给我一点时间"
                :data="tableDatas.list">
        <el-table-column sortable fixed align="center" prop="account_id" label="商户订单号" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="account_no" label="流水号" width="145"></el-table-column>
        <el-table-column sortable align="right" prop="account_parkname" label="停车场" width="100"></el-table-column>
        <el-table-column sortable align="center" prop="account_chargeunitname" label="收费路段"
                         width="170"></el-table-column>
        <el-table-column sortable align="center" prop="account_place" label="泊位编号" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="account_carno" label="车牌号" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="account_cartypename" label="车辆类型" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="account_intime" label="入场时间" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="account_outorgname" label="出场收费单位" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="account_outuserrealname" label="出场收费员"
                         width="150"></el-table-column>
        <el-table-column sortable align="center" prop="account_outtime" label="最后取证时间" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="account_handletime" label="出场操作时间" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="account_type" label="缴费类型" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="account_epaytypevalue" label="支付方式"
                         width="150"></el-table-column>
        <el-table-column sortable align="center" prop="account_money" label="金额" width="150"></el-table-column>
        <el-table-column sortable align="center" prop="account_paytime" label="支付时间" width="150"></el-table-column>
      </el-table>
    </el-main>
    <el-footer>
      <el-pagination
        background
        layout="total,sizes,prev,pager,next,jumper"
        :total="dataCount"
        :page-sizes="[10,20,30,50]"
        :page-size="dataPageSize"
        @current-change="handleCurrentChange"
        @size-change="handleSizeChange"
        style="margin-top: 16px;"
      ></el-pagination>
    </el-footer>
  </el-container>
</template>

<script>
  /* eslint-disable */
  export default {
    name: 'ele-pay-det-table',
    data() {
      return {
        labelPosition: 'left',
        pageNum: 1, // 当前页码
        dataCount: 0, // 数据总条数
        dataPageSize: 0, // 每页显示条数
        downloadLoading: false,
      }
    },
    props: ['loading', 'tableDatas'],
    watch: {
      pageNum: function (val) {
        this.$emit('pageNums', val)
      },
      tableDatas: function (val) {
        this.dataCount = val.count
        this.dataPageSize = val.pageSize
      }
    },
    methods: {
      handleCurrentChange: function (val) {
        this.pageNum = val
      },
      handleSizeChange(val) {
        this.$emit('sizePage', val)
      },
      handleDownloadfinacia() {
        this.downloadLoading = true
      }
    }
  }
</script>

<style scoped>
  .btn-group > .el-button span{
    display: none;
  }
  .btn-group > .el-button:hover{
    background-color: #409EFF;
  }
  .btn-group > .el-button:hover span{
    display: block;
  }
  .btn-group > .el-button:hover i{
    display: none;
  }
</style>
